
function getColorjson(path) {
    $.ajax({
        url:path,
        type:"GET",
        dataType:"json",
        cache:true,
        success:function (data) {
            addColorBox(data) ;
        },
        error:function () {
            alert("qwq") ;
        }
    }) ;
}
function addColorBox(dataJson) {
    var res=dataJson["color-list"] ;
    $.each(res,function(index,obj){
        var tiny_list="" ;
        var tmp_list=res[index]["val"] ;
        console.log(tmp_list) ;
        tmp_list.forEach(function(obj){
            tiny_list+= "<div class=\"color\" style=\"background: "
                        +obj+"\"></div>" ;
        });
        var tmp="<a class=\"select-card\" href=\"detail/"
                //+index+".html\">" 
                +index+"\">" 
                +"<div class=\"color-preview\" style=\"background:"
                +""+"\">"
                +tiny_list
                +"</div>"
                +"<div class=\"footer-box\">"
                +"<h2 class=\"discri\">"
                +obj["colr"]
                +"</h2></div></a>" ;
        $(".color-box").append(tmp) ;
    }) ;
} ;
/*
{
    "colr":"1",
    "val":[
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        ""
    ]
}
 */